<extend name="Public:innerbase"/>
<block name="css">
<link rel="stylesheet" href="{:STATICS}/kindeditor/themes/default/default.css" />
<link rel="stylesheet" href="{:STATICS}/kindeditor/plugins/code/prettify.css" />
</block>
<block name="js">
<include file="Public:editor" />
<script src="{:RES}/js/date/WdatePicker.js"></script>
</block>
<block name="content">
<div class="container-fluid">
    <div class="page-header">
		<h4>发布会员特权 </h4>
		<small>填写一些长期不变的会员卡优惠特权信息</small><br/>
		<a href="{:U('privilege',['cid'=>$_GET['cid']])}" class="btn btn-sm btn-default">
			<span class="glyphicon glyphicon-chevron-left"></span>&nbsp;返回
		</a>
	</div>
    <form class="form-horizontal" method="post" action="" enctype="multipart/form-data">
		<input type="hidden" name="id" value="{$vip.id}" />
		<div class="form-group">
			<label class="col-sm-2 control-label">特权名称</label>
			<div class="col-md-4">
				<input type="input" class="form-control" id="title" value="{$vip.title}" name="title" />
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">有效期</label>
			<div class="col-md-4">
				<label class="radio-inline">
					<input name="type" type="radio" id="RadioGroup1_1" onclick="document.getElementById('cktime').style.display='none';" value="1" <if  condition="$vip['type'] eq 1"> checked</if>>
					长期有效
				</label>
				<label class="radio-inline">
					<input name="type" type="radio" id="RadioGroup1_0" onclick="document.getElementById('cktime').style.display='';" value="0" <if  condition="$vip['type'] eq 0"> checked</if>>
					选择时间期限
				</label>
			</div>
		</div>
		<div class="form-group" id="cktime" <if  condition="$vip['type'] eq 1">style="display:none;"</if>>
			<div class="col-sm-offset-2 col-md-4">
				<input type="input" style="width:120px;display:inline;" class="form-control" id="startdate" value="<if condition="$vip['startdate'] neq false">{$vip.startdate|date="Y-m-d",###}</if>" onClick="WdatePicker()" name="startdate" />&nbsp;到&nbsp;
				<input type="input" style="width:120px;display:inline;"  class="form-control" id="enddate" name="enddate" value="<if condition="$vip['enddate'] neq false">{$vip.enddate|date="Y-m-d",###}</if>"  onClick="WdatePicker()" />
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">使用说明</label>
			<div class="col-md-6">
				<textarea name="info" id="content" style="height:240px;" rows="8" class="form-control">{$vip.info}</textarea>
			</div>
		</div>
		<div class="form-group">
			<div class="col-sm-offset-2 col-md-4">
				<button type="submit" name="button" class="btn btn-success">保存</button>
			</div>
		</div>
	</form>
	</div>
</block>